package shiqi.util.stream;

import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author shiqi
 * @version 1.0.0
 * @ClassName Person.java
 * @Description
 * @createTime 2022-05-06
 */
@ToString
@NoArgsConstructor
public class Person {
    private String name;
    private Integer age;
    private Double money;

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public Integer getAge() {
        return age;
    }

    public Double getMoney() {
        return money;

    }

    public Person setName(String name) {
        this.name = name;
        // set方法要返回this，方便继续调用下一个set
        return this;
    }

    public Person setAge(Integer age) {
        this.age = age;
        return this;
    }

    public Person setMoney(Double money) {
        this.money = money;
        return this;
    }
}
